<%@ page language="java" import="java.util.*,com.example.filemanagement.*" pageEncoding="utf-8"%>
<html>
<body>
<%
    request.setCharacterEncoding("utf-8");
    String UserName = request.getParameter("UserName");
    String PassWord = request.getParameter("PassWord");
    String Name = request.getParameter("Name");
    int RegisterResult =Connect.RegisterManagement(Name,UserName,PassWord);
    if (RegisterResult == -1){
        request.setAttribute("msg","用户名、密码、姓名都不能为空！");
        request.getRequestDispatcher("RegisterManageForm.jsp").forward(request,response);
    }
    if (RegisterResult == 1){
        request.setAttribute("msg","注册成功！");
        request.getRequestDispatcher("ManageForm.jsp").forward(request,response);
    }
    else if (RegisterResult == 0){
        request.setAttribute("msg","用户已存在！");
        request.getRequestDispatcher("RegisterManageForm.jsp").forward(request,response);
    }
%>
</body>
</html>
